#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <mutex>
#include <vector>
using namespace std;

class Singleton
{
public:
	Singleton* GetInstance()
	{
		if (_ins == nullptr)
		{
			_mutex.lock();
			if (_ins == nullptr)
			{
				Singleton();
				_mutex.unlock();
			}
			else
			{
				_mutex.unlock();
			}
		}
		return _ins;
	}
private:
	Singleton()
	{
		cout << "Singleton()" << endl;
	}
	Singleton(const Singleton&) = delete;
	Singleton& operator=(const Singleton&) = delete;
private:
	static Singleton* _ins;
	mutex _mutex;
};
Singleton* Singleton::_ins = nullptr;

int main()
{

	return 0;
}
